<?php

namespace Database\Factories;

use App\Models\WechatUser;
use Illuminate\Database\Eloquent\Factories\Factory;

class WechatUserFactory extends Factory
{
    /**
     * The name of the factory's corresponding model.
     *
     * @var string
     */
    protected $model = WechatUser::class;

    /**
     * Define the model's default state.
     *
     * @return array
     */
    public function definition()
    {
        return [
            'user_id' => $this->faker->numberBetween(1, 999),
            'group_id' => $this->faker->numberBetween(1, 9999),
            'nickname' => $this->faker->text(15),
            'avatar' => $this->faker->randomElement(
                [
                    'a.png',
                    'b.jpg',
                    'c.png'
                ]
            ),
            'password' => bcrypt(123),
            'phone' => $this->faker->numberBetween(10000000000, 99999999999),
            'qq_number' => $this->faker->numberBetween(10000000000, 99999999999),
            'sex' => $this->faker->randomElement([0, 1]),
            'user_type' => $this->faker->text(15),
            'language' => $this->faker->text(10),
            'country' => $this->faker->text(10),
            'province' => $this->faker->text(10),
            'city' => $this->faker->text(10),
            'second' => $this->faker->numberBetween(1000000000, 999999999),
            'unionid' => $this->faker->numberBetween(1, 1000000),
            'openid' => $this->faker->numberBetween(1, 1000000),
            'remark' => $this->faker->text(15),
            'tagid_list' => $this->faker->text(15),
            'subscribe' => $this->faker->text(20),
            'subscribe_time' => $this->faker->time('Y-m-d H:i:s', 'now'),
        ];
    }
}
